#include <stdio.h>  
#include <stdlib.h>  
void inplace_swap(int *a, int *b);
void reverse_array(int a[], int cnt);
void main(void)
	{
	int a[100],n;
	int i, len = 0;
	printf("how many?\n");
	for (i = 0; i<100 && scanf("%d", &a[i]) != NULL; i++)
		{
		len++;
		}
	n = len;
	reverse_array(a, len);
	printf("input array:\n");
	for (i = 0; i<n; i++)
		{
		printf("%d ", a[i]);
		}
	}
void inplace_swap(int *a, int *b)
	{
	*a = *a ^ *b;
	*b = *a ^ *b;
	*a = *a ^ *b;
	}
//???????????????????  
void reverse_array(int a[], int cnt)
	{
	int first, last;
	for (first = 0, last = cnt - 1; first<last; first++, last--)
		{
		inplace_swap(&a[first], &a[last]);
		}
	}
